package com.lk.api.own;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lk.api.R;

public class SildeGallery extends Activity {

	private int[] mPhotosIntArray;
	private LayoutInflater mLayoutInflater;
	private LinearLayout mGalleryLinearLayout;
	ImageView imageView = null;
	TextView textView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.sildegallery);
		mGalleryLinearLayout = (LinearLayout) findViewById(R.id.galleryLinearLayout);
		mLayoutInflater = LayoutInflater.from(this);

		//һ����ʾ
		View itemView = mLayoutInflater.inflate(R.layout.gallery_item, null);
		imageView = (ImageView) itemView.findViewById(R.id.imageViews);
		imageView.setImageResource(R.drawable.animated_gif);
		mGalleryLinearLayout.addView(itemView);
//		initData();

	}
//�����ʾ
//	private void initData() {
//
//		// ImageView imageView = null;
//		// TextView textView;
//		// View itemView = mLayoutInflater.inflate(R.layout.gallery_item, null);
//		// imageView=(ImageView) itemView.findViewById(R.id.imageViews);
//		// imageView.setImageResource(R.drawable.animated_gif);
//		// mGalleryLinearLayout.addView(itemView);
//
//		mPhotosIntArray = new int[] { R.drawable.animated_gif,
//				R.drawable.animated_gif, R.drawable.animated_gif,
//				R.drawable.animated_gif, R.drawable.animated_gif };
//		int i = 0;
//
//		for (i = 0; i < mPhotosIntArray.length; i++) {
//			View itemView = mLayoutInflater
//					.inflate(R.layout.gallery_item, null);
//			imageView = (ImageView) itemView.findViewById(R.id.imageViews);
//			textView = (TextView) itemView.findViewById(R.id.textViews);
//			imageView.setImageResource(mPhotosIntArray[i]);
//			textView.setText("this is" + (i + 1));
//			mGalleryLinearLayout.addView(itemView);
//
//		}
//	}

}
